﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<UI.Data.Usuarios>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    List
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Lista de usuarios</h2>
    <div style="display: inline; float: left">
        <h3>
            Activos</h3>
        <table class="table table-bordered table-striped table-condensed tree-grid grid scrolleable"
            style="width: auto; overflow: auto;">
            <tr>
                <th>
                    <%: Html.DisplayName("Nombre de usuario") %>
                </th>
                <th>
                    <%: Html.DisplayName("Puntos") %>
                </th>
                <th>
                </th>
            </tr>
            <% foreach (var item in Model.Where(x => x.Activo == 1))
               { %>
            <tr>
                <td>
                    <%:item.Username %>
                </td>
                <td>
                    <%:item.Puntos %>
                </td>
                <td>
                    <%: Html.ActionLink("Dar de baja", "Baja", new { id=item.Id }) %>
                </td>
            </tr>
            <% } %>
        </table>
    </div>
    <div style="display: inline; float: right">
        <h3>
            Inactivos</h3>
        <table class="table table-bordered table-striped table-condensed tree-grid grid scrolleable"
            style="width: auto; overflow: auto;">
            <tr>
                <th>
                    <%: Html.DisplayName("Nombre de usuario") %>
                </th>
                <th>
                    <%: Html.DisplayName("Puntos") %>
                </th>
                <th>
                </th>
            </tr>
            <% foreach (var item in Model.Where(x => x.Activo == 0))
               { %>
            <tr>
                <td>
                    <%:item.Username %>
                </td>
                <td>
                    <%:item.Puntos %>
                </td>
                <td>
                    <%: Html.ActionLink("Dar de alta", "Alta", new { id=item.Id }) %>
                </td>
            </tr>
            <% } %>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptsSection" runat="server">
</asp:Content>
